// -----------------------------------------------------------------------
//  <copyright file="ApiAuthConfig.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2024 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2024-04-22 23:04</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Authorization;

/// <summary>
/// API权限配置
/// </summary>
public class ApiAuthConfig
{
    /// <summary>
    /// 获取或设置 API权限码
    /// </summary>
    public required string ApiResourceCode { get; set; }

    /// <summary>
    /// 获取或设置 API需求的资源操作
    /// </summary>
    public required string ApiOperation { get; set; }

    /// <summary>
    /// 获取或设置 API资源访问类型
    /// </summary>
    public ResourceAccessType AccessType { get; set; } = ResourceAccessType.None;

    /// <summary>
    /// 获取或设置 数据权限关联的实体资源码
    /// </summary>
    public string? DataEntityResourceCode { get; set; }
}
